package com.gitee.kamismile.stone.basic.data.domain.sysUser.service;

import com.gitee.kamismile.stone.basic.data.domain.sysUser.repository.entity.*;
import org.springframework.data.domain.Page;
import org.springframework.data.relational.core.query.Criteria;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;

public interface ISysUserDomainService {


    public Mono<SysDepUser> saveOrUpdate(SysDepUser sysDepUser);

    public Mono<Void> deleteUserDepById(Integer nSysDepUserId);

    public Mono<Page<SysDepUser>> findUserDepPage(int page, int size,
                                                        Criteria criteria);

    public Mono<SysDepUser> findAndCheckUserDepById(Integer nSysDepUserId, Integer nTenantId);



    public Mono<SysRoleUser> saveOrUpdate(SysRoleUser sysUserResources);

    public Mono<Void> deleteUserRoleById(Integer nSysRoleUserId);

    public Mono<Page<SysRoleUser>> findUserRolePage(int page, int size,
                                                  Criteria criteria);


    public Mono<SysRoleUser> findAndCheckUserRoleById(Integer nSysRoleUserId, Integer nTenantId);


    public Mono<SysUserResources> saveOrUpdate(SysUserResources sysUserResources);

    public Mono<Void> deleteUserResById(Integer nSysUserResourcesId);

    public Mono<Page<SysUserResources>> findUserResPage(int page, int size,
                                            Criteria criteria);

    public Mono<SysUserResources> findAndCheckUserResById(Integer nSysUserResourcesId, Integer nTenantId);



    public Mono<SysUserSetup> saveOrUpdate(SysUserSetup sysUserResources);

    public Mono<Void> deleteUserSetupById(Integer nUserSetupId);

    public Mono<Page<SysUserSetup>> findUserSetupPage(int page, int size,
                                                        Criteria criteria);


    public Mono<SysUserSetup> findAndCheckUserSetupById(Integer nUserSetupId, Integer nTenantId);

    public Mono<SysUserShortcut> saveOrUpdate(SysUserShortcut sysUserResources);

    public Mono<Void> deleteUserShortById(Integer nSysUserShortcutId);

    public Mono<Page<SysUserShortcut>> findUserShortPage(int page, int size,
                                                       Criteria criteria);

    public Mono<SysUserShortcut> findAndCheckUserShortcutByResId(Integer nResId, Integer nUserId, Integer nTenantId);

    public Mono<Void> deleteUserDepByUserId(Integer nUserId, Integer nTenantId);

    public Mono<Void> deleteUserRoleByUserId(Integer nUserId, Integer nTenantId);

    Flux<SysRoleUser> saveBatch(List<SysRoleUser> sysRoleUsers);
}
